import { Ref } from "vue";
export default function OperationHook(state: {
  drawerOpts: Base.DrawerOpts;
  passData: Ref<Base.GeneraDataType>;
  dialogOpts: Base.DialogOpts;
  formState: StatementPayable.FeeInfo;
  emit: any;
  loading: Ref<boolean>;
  init: (id: string, selectNext?: boolean) => void;
}) {
  const { drawerOpts, passData } = state;
  // 查看发票
  const showInvoiceHandle = () => {
    drawerOpts.width = "1200px";
    drawerOpts.title = "查看发票";
    drawerOpts.type = 1;
    drawerOpts.passData = { id: passData.value.waybillId };
    drawerOpts.component = "ShowInvoice";
    drawerOpts.visible = true;
  };
  return {
    showInvoiceHandle
  };
}
